{% set SURICATAOPTIONS = {} %}
{% set ENABLED = salt['pillar.get']('suricata:enabled', 'True') %}

# don't start the docker container if it is an import node or disabled via pillar
{% if grains.id.split('_')|last == 'import' or ENABLED is sameas false %}
  {% do SURICATAOPTIONS.update({'start': False}) %}
{% else %}
  {% do SURICATAOPTIONS.update({'start': True}) %}
{% endif %}

{% if ENABLED is sameas false %}
  {% do SURICATAOPTIONS.update({'status': 'absent'}) %}
{% else %}
  {% do SURICATAOPTIONS.update({'status': 'running'}) %}
{% endif %}